package br.com.playonline.persistencia;

import java.util.List;

import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import br.com.playonline.domain.Pessoa;
import br.com.playonline.domain.Usuario;

@Component
public class PessoaHibernateDAO extends HibernateDAOGenerico<Pessoa, Long> {

	@Autowired
	public PessoaHibernateDAO(SessionFactory sessionFactory) {
		super(sessionFactory);
	}

	public List<Pessoa> findByCpf(String cpf){
		return findByCriteria(Restrictions.eq("cpf", cpf));
	}
	
	
}
